package com.chenglu.android.index.mvp.model;





import com.chenglu.android.common.net.RetrofitClientCL;
import com.chenglu.android.index.bean.BannerBeanList;
import com.chenglu.android.index.bean.IndexRecomBean;
import com.chenglu.android.index.bean.NearbyShopBean;
import com.chenglu.android.index.bean.PageListBean;
import com.chenglu.android.index.bean.TabTitleBean;
import com.chenglu.android.index.mvp.contract.IndexContract;

import java.util.Map;

import io.reactivex.rxjava3.core.Observable;

/**
 * @author: lyj
 * @Created by Copyright 2023/6/2 Guangzhou Hongma Technology Co., Ltd. All rights reserved.
 *
 */
public class IndexModel implements IndexContract.IndexModel {

    @Override
    public Observable<BannerBeanList> getBannerList(String shopsTypeId , String showType) {
        return RetrofitClientCL.getInstance().getApi().getBannerList(shopsTypeId, showType);
    }

    @Override
    public Observable<PageListBean> getPageList(String level, String isIdxShow) {
        return RetrofitClientCL.getInstance().getApi().getPageList(level, isIdxShow);
    }

    @Override
    public Observable<NearbyShopBean> getNearbyShop(String lng, String lat) {
        return RetrofitClientCL.getInstance().getApi().getNearbyShop(lng, lat);
    }

    @Override
    public Observable<IndexRecomBean> getIndexRecom(Map<String, String> map) {
        return RetrofitClientCL.getInstance().getApi().getIndexPage(map);
    }

    @Override
    public Observable<IndexRecomBean> getIndexSell(Map<String, String> map) {
        return RetrofitClientCL.getInstance().getApi().getIndexPage(map);
    }

    @Override
    public Observable<TabTitleBean> getTabTitle() {
        return RetrofitClientCL.getInstance().getApi().getTabTitle();
    }

    @Override
    public Observable<IndexRecomBean> getTabTitleData(Map<String, String> map) {
        return RetrofitClientCL.getInstance().getApi().getIndexPage(map);
    }


}
